home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!howland.reston.ans.net!xlink.net!rz.uni-karlsruhe.de!stepsun.uni-kl.de!uklirb.informatik.uni-kl.de!feck
- From: feck@informatik.uni-kl.de (Christoph Feck IRZ)
- Subject: Re: BOOPSI-Button with Key Support
- Message-ID: <1994May17.204200@informatik.uni-kl.de>
- Sender: news@uklirb.informatik.uni-kl.de (Unix-News-System)
- Nntp-Posting-Host: uklira.informatik.uni-kl.de
- Organization: University of Kaiserslautern, Germany
- References: <inf01.769175363@apollo23>
- Date: Tue, 17 May 1994 18:42:00 GMT
- Lines: 24
-
- In article <inf01.769175363@apollo23>, inf01@apollo23.uni-trier.de (Hans-Joerg Frieden) writes:
- > I just happened to be writing a program that needs some BOOSPI button
- > gadgets. I need them with the little underscore to mark a keyboard
- > shortcut, and they should be able to handle this by themselves.
-
- Regarding keyboard input: Intuition can only send input
- to a gadget that is going to be activated (GM_ACTIVE),
- or that is active and currently procssing input (GM_HANDLE).
- In other words, your gadget will never know that the
- user pressed a key unless you activated it yourself.
-
- There are two solutions: Have a master gadget, which
- you keep active (ActivateGadget() it whenever you get
- a IDCMP_GADGETUP or IDCMP_ACTIVEWINDOW) and which sends
- all keyboard events to all it's subgadgets (groupgclass
- will do this).
-
- The other solution is to use IDCMP_RAWKEY (so that you
- can recieve KEYUP events) and activate the gadget
- associated with a given character yourself (MUI will
- do this :)
-
- 3k// Christoph Feck, TowerSystems - BOOPSI Class Development
- \X/ Amiga - Intuition inside.
-